package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.IdleAffiliateCpaCommissionConfigMapper;
import com.ruoyi.system.domain.IdleAffiliateCpaCommissionConfig;
import com.ruoyi.system.service.IIdleAffiliateCpaCommissionConfigService;

/**
 * 闲鱼联盟CPA佣金配置Service业务层处理
 * 
 * @author ruoyi
 */
@Service
public class IdleAffiliateCpaCommissionConfigServiceImpl implements IIdleAffiliateCpaCommissionConfigService 
{
    @Autowired
    private IdleAffiliateCpaCommissionConfigMapper idleAffiliateCpaCommissionConfigMapper;

    /**
     * 查询闲鱼联盟CPA佣金配置
     * 
     * @param id 闲鱼联盟CPA佣金配置主键
     * @return 闲鱼联盟CPA佣金配置
     */
    @Override
    public IdleAffiliateCpaCommissionConfig selectIdleAffiliateCpaCommissionConfigById(Long id)
    {
        return idleAffiliateCpaCommissionConfigMapper.selectIdleAffiliateCpaCommissionConfigById(id);
    }

    /**
     * 根据推广类型查询闲鱼联盟CPA佣金配置
     * 
     * @param promotionType 推广类型
     * @return 闲鱼联盟CPA佣金配置
     */
    @Override
    public IdleAffiliateCpaCommissionConfig selectIdleAffiliateCpaCommissionConfigByPromotionType(Integer promotionType)
    {
        return idleAffiliateCpaCommissionConfigMapper.selectIdleAffiliateCpaCommissionConfigByPromotionType(promotionType);
    }

    /**
     * 查询闲鱼联盟CPA佣金配置列表
     * 
     * @param idleAffiliateCpaCommissionConfig 闲鱼联盟CPA佣金配置
     * @return 闲鱼联盟CPA佣金配置
     */
    @Override
    public List<IdleAffiliateCpaCommissionConfig> selectIdleAffiliateCpaCommissionConfigList(IdleAffiliateCpaCommissionConfig idleAffiliateCpaCommissionConfig)
    {
        return idleAffiliateCpaCommissionConfigMapper.selectIdleAffiliateCpaCommissionConfigList(idleAffiliateCpaCommissionConfig);
    }

    /**
     * 新增闲鱼联盟CPA佣金配置
     * 
     * @param idleAffiliateCpaCommissionConfig 闲鱼联盟CPA佣金配置
     * @return 结果
     */
    @Override
    public int insertIdleAffiliateCpaCommissionConfig(IdleAffiliateCpaCommissionConfig idleAffiliateCpaCommissionConfig)
    {
        return idleAffiliateCpaCommissionConfigMapper.insertIdleAffiliateCpaCommissionConfig(idleAffiliateCpaCommissionConfig);
    }

    /**
     * 修改闲鱼联盟CPA佣金配置
     * 
     * @param idleAffiliateCpaCommissionConfig 闲鱼联盟CPA佣金配置
     * @return 结果
     */
    @Override
    public int updateIdleAffiliateCpaCommissionConfig(IdleAffiliateCpaCommissionConfig idleAffiliateCpaCommissionConfig)
    {
        return idleAffiliateCpaCommissionConfigMapper.updateIdleAffiliateCpaCommissionConfig(idleAffiliateCpaCommissionConfig);
    }

    /**
     * 批量删除闲鱼联盟CPA佣金配置
     * 
     * @param ids 需要删除的闲鱼联盟CPA佣金配置主键
     * @return 结果
     */
    @Override
    public int deleteIdleAffiliateCpaCommissionConfigByIds(Long[] ids)
    {
        return idleAffiliateCpaCommissionConfigMapper.deleteIdleAffiliateCpaCommissionConfigByIds(ids);
    }

    /**
     * 删除闲鱼联盟CPA佣金配置信息
     * 
     * @param id 闲鱼联盟CPA佣金配置主键
     * @return 结果
     */
    @Override
    public int deleteIdleAffiliateCpaCommissionConfigById(Long id)
    {
        return idleAffiliateCpaCommissionConfigMapper.deleteIdleAffiliateCpaCommissionConfigById(id);
    }
} 